#include <cstdio>

int main( )
{
    int a, b, i;
    bool flag;
    char str[ 100 ];
    while ( scanf("%s", str) != EOF )
    {
        flag = false;
        if ( str[ 0 ] == '-' )
        {
            flag = true;
            i = 1;
        }
        else
            i = 0;
        a = b = 0;
        for ( ; str[ i ]; i++ )
            if ( str[ i ] != ',' )
                a = a * 10 + str[ i ] - '0';
        if ( flag ) a = -a;
        scanf("%s", str);
        flag = false;
        if ( str[ 0 ] == '-' )
        {
            flag = true;
            i = 1;
        }
        else
            i = 0;
        for ( ; str[ i ]; i++ )
            if ( str[ i ] != ',' )
                b = b * 10 + str[ i ] - '0';
        if ( flag ) b = -b;
        printf("%d\n", a + b);
    }
    return 0;
}
